/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package nodeLevelMetaModel.impl;

import nodeLevelMetaModel.LeaderRole;
import nodeLevelMetaModel.MemberRole;
import nodeLevelMetaModel.NodeLevelMetaModelPackage;
import nodeLevelMetaModel.ReceivingTask;
import nodeLevelMetaModel.SendingTask;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Sending Task</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link nodeLevelMetaModel.impl.SendingTaskImpl#getProtocol <em>Protocol</em>}</li>
 *   <li>{@link nodeLevelMetaModel.impl.SendingTaskImpl#getSendDataType <em>Send Data Type</em>}</li>
 *   <li>{@link nodeLevelMetaModel.impl.SendingTaskImpl#getTransmissionCondition <em>Transmission Condition</em>}</li>
 *   <li>{@link nodeLevelMetaModel.impl.SendingTaskImpl#getCompress <em>Compress</em>}</li>
 *   <li>{@link nodeLevelMetaModel.impl.SendingTaskImpl#getEncryption <em>Encryption</em>}</li>
 *   <li>{@link nodeLevelMetaModel.impl.SendingTaskImpl#getName14 <em>Name14</em>}</li>
 *   <li>{@link nodeLevelMetaModel.impl.SendingTaskImpl#getName15 <em>Name15</em>}</li>
 *   <li>{@link nodeLevelMetaModel.impl.SendingTaskImpl#getName16 <em>Name16</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class SendingTaskImpl extends EObjectImpl implements SendingTask {
	/**
	 * The default value of the '{@link #getProtocol() <em>Protocol</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getProtocol()
	 * @generated
	 * @ordered
	 */
	protected static final String PROTOCOL_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getProtocol() <em>Protocol</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getProtocol()
	 * @generated
	 * @ordered
	 */
	protected String protocol = PROTOCOL_EDEFAULT;

	/**
	 * The default value of the '{@link #getSendDataType() <em>Send Data Type</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getSendDataType()
	 * @generated
	 * @ordered
	 */
	protected static final String SEND_DATA_TYPE_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getSendDataType() <em>Send Data Type</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getSendDataType()
	 * @generated
	 * @ordered
	 */
	protected String sendDataType = SEND_DATA_TYPE_EDEFAULT;

	/**
	 * The default value of the '{@link #getTransmissionCondition() <em>Transmission Condition</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getTransmissionCondition()
	 * @generated
	 * @ordered
	 */
	protected static final String TRANSMISSION_CONDITION_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getTransmissionCondition() <em>Transmission Condition</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getTransmissionCondition()
	 * @generated
	 * @ordered
	 */
	protected String transmissionCondition = TRANSMISSION_CONDITION_EDEFAULT;

	/**
	 * The default value of the '{@link #getCompress() <em>Compress</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getCompress()
	 * @generated
	 * @ordered
	 */
	protected static final String COMPRESS_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getCompress() <em>Compress</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getCompress()
	 * @generated
	 * @ordered
	 */
	protected String compress = COMPRESS_EDEFAULT;

	/**
	 * The default value of the '{@link #getEncryption() <em>Encryption</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getEncryption()
	 * @generated
	 * @ordered
	 */
	protected static final String ENCRYPTION_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getEncryption() <em>Encryption</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getEncryption()
	 * @generated
	 * @ordered
	 */
	protected String encryption = ENCRYPTION_EDEFAULT;

	/**
	 * The cached value of the '{@link #getName14() <em>Name14</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getName14()
	 * @generated
	 * @ordered
	 */
	protected LeaderRole name14;

	/**
	 * The cached value of the '{@link #getName15() <em>Name15</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getName15()
	 * @generated
	 * @ordered
	 */
	protected MemberRole name15;

	/**
	 * The cached value of the '{@link #getName16() <em>Name16</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getName16()
	 * @generated
	 * @ordered
	 */
	protected ReceivingTask name16;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected SendingTaskImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return NodeLevelMetaModelPackage.Literals.SENDING_TASK;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getProtocol() {
		return protocol;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setProtocol(String newProtocol) {
		String oldProtocol = protocol;
		protocol = newProtocol;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, NodeLevelMetaModelPackage.SENDING_TASK__PROTOCOL, oldProtocol, protocol));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getSendDataType() {
		return sendDataType;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setSendDataType(String newSendDataType) {
		String oldSendDataType = sendDataType;
		sendDataType = newSendDataType;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, NodeLevelMetaModelPackage.SENDING_TASK__SEND_DATA_TYPE, oldSendDataType, sendDataType));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getTransmissionCondition() {
		return transmissionCondition;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setTransmissionCondition(String newTransmissionCondition) {
		String oldTransmissionCondition = transmissionCondition;
		transmissionCondition = newTransmissionCondition;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, NodeLevelMetaModelPackage.SENDING_TASK__TRANSMISSION_CONDITION, oldTransmissionCondition, transmissionCondition));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getCompress() {
		return compress;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setCompress(String newCompress) {
		String oldCompress = compress;
		compress = newCompress;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, NodeLevelMetaModelPackage.SENDING_TASK__COMPRESS, oldCompress, compress));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getEncryption() {
		return encryption;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setEncryption(String newEncryption) {
		String oldEncryption = encryption;
		encryption = newEncryption;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, NodeLevelMetaModelPackage.SENDING_TASK__ENCRYPTION, oldEncryption, encryption));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public LeaderRole getName14() {
		if (name14 != null && name14.eIsProxy()) {
			InternalEObject oldName14 = (InternalEObject)name14;
			name14 = (LeaderRole)eResolveProxy(oldName14);
			if (name14 != oldName14) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, NodeLevelMetaModelPackage.SENDING_TASK__NAME14, oldName14, name14));
			}
		}
		return name14;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public LeaderRole basicGetName14() {
		return name14;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setName14(LeaderRole newName14) {
		LeaderRole oldName14 = name14;
		name14 = newName14;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, NodeLevelMetaModelPackage.SENDING_TASK__NAME14, oldName14, name14));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public MemberRole getName15() {
		if (name15 != null && name15.eIsProxy()) {
			InternalEObject oldName15 = (InternalEObject)name15;
			name15 = (MemberRole)eResolveProxy(oldName15);
			if (name15 != oldName15) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, NodeLevelMetaModelPackage.SENDING_TASK__NAME15, oldName15, name15));
			}
		}
		return name15;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public MemberRole basicGetName15() {
		return name15;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setName15(MemberRole newName15) {
		MemberRole oldName15 = name15;
		name15 = newName15;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, NodeLevelMetaModelPackage.SENDING_TASK__NAME15, oldName15, name15));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ReceivingTask getName16() {
		if (name16 != null && name16.eIsProxy()) {
			InternalEObject oldName16 = (InternalEObject)name16;
			name16 = (ReceivingTask)eResolveProxy(oldName16);
			if (name16 != oldName16) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, NodeLevelMetaModelPackage.SENDING_TASK__NAME16, oldName16, name16));
			}
		}
		return name16;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ReceivingTask basicGetName16() {
		return name16;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setName16(ReceivingTask newName16) {
		ReceivingTask oldName16 = name16;
		name16 = newName16;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, NodeLevelMetaModelPackage.SENDING_TASK__NAME16, oldName16, name16));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case NodeLevelMetaModelPackage.SENDING_TASK__PROTOCOL:
				return getProtocol();
			case NodeLevelMetaModelPackage.SENDING_TASK__SEND_DATA_TYPE:
				return getSendDataType();
			case NodeLevelMetaModelPackage.SENDING_TASK__TRANSMISSION_CONDITION:
				return getTransmissionCondition();
			case NodeLevelMetaModelPackage.SENDING_TASK__COMPRESS:
				return getCompress();
			case NodeLevelMetaModelPackage.SENDING_TASK__ENCRYPTION:
				return getEncryption();
			case NodeLevelMetaModelPackage.SENDING_TASK__NAME14:
				if (resolve) return getName14();
				return basicGetName14();
			case NodeLevelMetaModelPackage.SENDING_TASK__NAME15:
				if (resolve) return getName15();
				return basicGetName15();
			case NodeLevelMetaModelPackage.SENDING_TASK__NAME16:
				if (resolve) return getName16();
				return basicGetName16();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case NodeLevelMetaModelPackage.SENDING_TASK__PROTOCOL:
				setProtocol((String)newValue);
				return;
			case NodeLevelMetaModelPackage.SENDING_TASK__SEND_DATA_TYPE:
				setSendDataType((String)newValue);
				return;
			case NodeLevelMetaModelPackage.SENDING_TASK__TRANSMISSION_CONDITION:
				setTransmissionCondition((String)newValue);
				return;
			case NodeLevelMetaModelPackage.SENDING_TASK__COMPRESS:
				setCompress((String)newValue);
				return;
			case NodeLevelMetaModelPackage.SENDING_TASK__ENCRYPTION:
				setEncryption((String)newValue);
				return;
			case NodeLevelMetaModelPackage.SENDING_TASK__NAME14:
				setName14((LeaderRole)newValue);
				return;
			case NodeLevelMetaModelPackage.SENDING_TASK__NAME15:
				setName15((MemberRole)newValue);
				return;
			case NodeLevelMetaModelPackage.SENDING_TASK__NAME16:
				setName16((ReceivingTask)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case NodeLevelMetaModelPackage.SENDING_TASK__PROTOCOL:
				setProtocol(PROTOCOL_EDEFAULT);
				return;
			case NodeLevelMetaModelPackage.SENDING_TASK__SEND_DATA_TYPE:
				setSendDataType(SEND_DATA_TYPE_EDEFAULT);
				return;
			case NodeLevelMetaModelPackage.SENDING_TASK__TRANSMISSION_CONDITION:
				setTransmissionCondition(TRANSMISSION_CONDITION_EDEFAULT);
				return;
			case NodeLevelMetaModelPackage.SENDING_TASK__COMPRESS:
				setCompress(COMPRESS_EDEFAULT);
				return;
			case NodeLevelMetaModelPackage.SENDING_TASK__ENCRYPTION:
				setEncryption(ENCRYPTION_EDEFAULT);
				return;
			case NodeLevelMetaModelPackage.SENDING_TASK__NAME14:
				setName14((LeaderRole)null);
				return;
			case NodeLevelMetaModelPackage.SENDING_TASK__NAME15:
				setName15((MemberRole)null);
				return;
			case NodeLevelMetaModelPackage.SENDING_TASK__NAME16:
				setName16((ReceivingTask)null);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case NodeLevelMetaModelPackage.SENDING_TASK__PROTOCOL:
				return PROTOCOL_EDEFAULT == null ? protocol != null : !PROTOCOL_EDEFAULT.equals(protocol);
			case NodeLevelMetaModelPackage.SENDING_TASK__SEND_DATA_TYPE:
				return SEND_DATA_TYPE_EDEFAULT == null ? sendDataType != null : !SEND_DATA_TYPE_EDEFAULT.equals(sendDataType);
			case NodeLevelMetaModelPackage.SENDING_TASK__TRANSMISSION_CONDITION:
				return TRANSMISSION_CONDITION_EDEFAULT == null ? transmissionCondition != null : !TRANSMISSION_CONDITION_EDEFAULT.equals(transmissionCondition);
			case NodeLevelMetaModelPackage.SENDING_TASK__COMPRESS:
				return COMPRESS_EDEFAULT == null ? compress != null : !COMPRESS_EDEFAULT.equals(compress);
			case NodeLevelMetaModelPackage.SENDING_TASK__ENCRYPTION:
				return ENCRYPTION_EDEFAULT == null ? encryption != null : !ENCRYPTION_EDEFAULT.equals(encryption);
			case NodeLevelMetaModelPackage.SENDING_TASK__NAME14:
				return name14 != null;
			case NodeLevelMetaModelPackage.SENDING_TASK__NAME15:
				return name15 != null;
			case NodeLevelMetaModelPackage.SENDING_TASK__NAME16:
				return name16 != null;
		}
		return super.eIsSet(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		if (eIsProxy()) return super.toString();

		StringBuffer result = new StringBuffer(super.toString());
		result.append(" (protocol: ");
		result.append(protocol);
		result.append(", sendDataType: ");
		result.append(sendDataType);
		result.append(", transmissionCondition: ");
		result.append(transmissionCondition);
		result.append(", compress: ");
		result.append(compress);
		result.append(", encryption: ");
		result.append(encryption);
		result.append(')');
		return result.toString();
	}

} //SendingTaskImpl
